<?php
/**
 * Author Yulin
 * Email  dwzhanglong@126.com
 * Date   2017-7-21
 * Func   首页入口
 */
defined('IN_YuLin') || exit('NO PERMIT!');

//	首页banner
$picSql = "select bn_pic FROM ".Table('admin_banner')." WHERE bn_type = 1 AND bn_code= '/index'";
$picRes = $db->getall($picSql);

$banner   = $db->getall('SELECT * FROM '.Table('web_ads').' WHERE pid = 1 AND status = 1 ORDER BY listorder DESC');
$userInfo = $_SESSION['userlast'];

if($a == 'check')
{
    $username = $_POST['username'];

    $data = $db->getrow('SELECT * FROM '.Table('user').' where username = "'.$username.'"');
    if(!$data)
    {
       echo 1;
    }else{
       echo 0;
    }
    exit;
}

$serviceLink = $db->getrow("select url from ".Table('weblist')." where tid = 1");

$tpl->display('index/index');